package com.cpi.cornpp.customer.view;

import java.io.Serializable;

public class CustomerView implements Serializable {
	private static final long serialVersionUID = 7067846811425130275L;
	public static final Object GROUP = "G";
	private String customerId;
	private String description;
	private String type;
	private String groupId;
	
	public String getCustomerId() {
		return customerId;
	}
	public void setCustomerId(String aCusId) {
		customerId = aCusId;
	}
	public String getDescription() {
		return description;
	}
	public String getShortDescription(){
		String shortDescription = null;
		if( description != null){
			shortDescription = description.length() > 23 ? description.substring(0, 23 ) + "..." : description;
		}
		return shortDescription;
	}
	public void setDescription(String aCusDescription) {
		description = aCusDescription;
	}
	public void setType(String type) {
		this.type = type;
	}
	public String getType() {
		return type;
	}
	public void setGroupId(String groupId) {
		this.groupId = groupId;
	}
	public String getGroupId() {
		return groupId;
	}
	public boolean equals(Object obj) {
		if(!(obj instanceof CustomerView))
			return false;
		CustomerView cus = (CustomerView)obj;
		return this.customerId.equals(cus.customerId); 		
	}
}